//
//  DCEmojiBoardView.h
//  xmppTest
//
//  Created by striby on 16/1/4.
//  Copyright © 2016年 com.dc. All rights reserved.
//

#import <UIKit/UIKit.h>



#ifndef DCDeviceWidth
#define DCDeviceWidth [UIScreen mainScreen].bounds.size.width
#endif

#ifndef DCDeviceHeight
#define DCDeviceHeight [UIScreen mainScreen].bounds.size.height
#endif

static const float emojiBoardHeight = 200;

static const float selectionAndSenderHeight = 40;

static const int emojiLinesNum = 3;

static const float emojiHeight = 45;

static const float emojiFontSize = 30;


#define EMOJI_TAG 100

#define SEND_TAG  200

#define DELETE_TAG 300


@protocol DCEmojiViewDelegate <NSObject>

-(void)emojiItemPressed:(UIButton*)sender;

@end


@interface DCEmojiBoardView : UIView<UIScrollViewDelegate>
/**
 *  单例方法
 *
 *  @return DCEmojiBoardView
 */
+(DCEmojiBoardView*)defaultEmojiBoardInView:(UIView*)superview;

/**
 *  主表情面板
 */
@property(nonatomic,strong,readonly)UIScrollView * emojiBoardScrollView;
/**
 *  表情包选择
 */
@property(nonatomic,strong,readonly)UIScrollView * emojiSelectionView;
/**
 *  发送按钮
 */
@property(nonatomic,strong,readonly)UIButton * senderBtn;
/**
 *   页面索引
 */
@property(nonatomic,strong,readonly)UIPageControl * pageControl;

/**
 *  面板代理
 */
@property(nonatomic,assign)id<DCEmojiViewDelegate> delegate;
/**
 *  显示表情面板
 *
 *  @param duration 动作时间
 */
-(void)showEmojiBoardWithDuration:(float)duration
                       isUsingAnination:(BOOL)useAnimation animations:(void (^ __nullable)(void))animations completion:(void (^ __nullable)(BOOL finished))completion;;
/**
 *  隐藏表情面板
 *
 *  @param duration 动作时间
 */
-(void)hideEmojiBoardWithDuration:(float)duration
                       isUsingAnination:(BOOL)useAnimation animations:(void (^ __nullable)(void))animations completion:(void (^ __nullable)(BOOL finished))completion;;

/**
 *  是否包含emoji
 *
 *  @param string
 *
 *  @return YES OR NO
 */
+ (BOOL)stringContainsEmoji:( NSString * )string;


@end
